﻿<!--
// (c) Copyright Microsoft Corporation.
// This source is subject to the Microsoft Public License (Ms-PL).
// Please see http://go.microsoft.com/fwlink/?LinkID=131993 for details.
// All other rights reserved.
-->

<phone:PhoneApplicationPage 
    x:Class="PhoneToolkitSample.MainPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
    xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
    xmlns:toolkit="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit"
    xmlns:localControls="clr-namespace:PhoneToolkitSample.LocalControls;assembly=PhoneToolkitSample"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d" d:DesignWidth="480" d:DesignHeight="768"
    FontFamily="{StaticResource PhoneFontFamilyNormal}"
    FontSize="{StaticResource PhoneFontSizeNormal}"
    Foreground="{StaticResource PhoneForegroundBrush}"
    SupportedOrientations="PortraitOrLandscape" Orientation="Portrait"
    shell:SystemTray.IsVisible="True"
    toolkit:TiltEffect.IsTiltEnabled="True">

    <toolkit:TransitionService.NavigationInTransition>
        <toolkit:NavigationInTransition>
            <toolkit:NavigationInTransition.Backward>
                <toolkit:TurnstileTransition Mode="BackwardIn"/>
            </toolkit:NavigationInTransition.Backward>
            <toolkit:NavigationInTransition.Forward>
                <toolkit:TurnstileTransition Mode="ForwardIn"/>
            </toolkit:NavigationInTransition.Forward>
        </toolkit:NavigationInTransition>
    </toolkit:TransitionService.NavigationInTransition>
    <toolkit:TransitionService.NavigationOutTransition>
        <toolkit:NavigationOutTransition>
            <toolkit:NavigationOutTransition.Backward>
                <toolkit:TurnstileTransition Mode="BackwardOut"/>
            </toolkit:NavigationOutTransition.Backward>
            <toolkit:NavigationOutTransition.Forward>
                <toolkit:TurnstileTransition Mode="ForwardOut"/>
            </toolkit:NavigationOutTransition.Forward>
        </toolkit:NavigationOutTransition>
    </toolkit:TransitionService.NavigationOutTransition>

    <Grid x:Name="LayoutRoot" Background="Transparent">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="*"/>
        </Grid.RowDefinitions>

        <StackPanel Grid.Row="0" Margin="12,17,0,28">
            <TextBlock Text="{StaticResource ApplicationTitle}" Style="{StaticResource PhoneTextNormalStyle}"/>
            <TextBlock Text="samples" Margin="9,-7,0,0" Style="{StaticResource PhoneTextTitle1Style}"/>
        </StackPanel>

        <Grid x:Name="ContentPanel" Grid.Row="1" Margin="12,0,12,0">
            <ScrollViewer Margin="0,0,-12,0">
                <StackPanel>
                    <StackPanel>
                        <StackPanel.Resources>
                            <Style 
                                TargetType="HyperlinkButton" 
                                BasedOn="{StaticResource PhoneButtonBase}"/>
                        </StackPanel.Resources>
                        <HyperlinkButton NavigateUri="/Samples/AutoCompleteBoxSample.xaml" 
                                         Style="{StaticResource HyperlinkEmptyStyle}">
                            <localControls:HeaderedContentControl
                                Style="{StaticResource MultilineHyperlinkStyle}"
                                Header="autocompletebox"
                                Content="Completion of text based on items"/>
                        </HyperlinkButton>
                        <HyperlinkButton NavigateUri="/Samples/ContextMenuSample.xaml"
                                         Style="{StaticResource HyperlinkEmptyStyle}">
                            <localControls:HeaderedContentControl
                                Style="{StaticResource MultilineHyperlinkStyle}"
                                Header="contextmenu"
                                Content="Tap &amp; hold menu options control"/>
                        </HyperlinkButton>
                        <HyperlinkButton NavigateUri="/Samples/CustomMessageBoxSample.xaml"
                                         Style="{StaticResource HyperlinkEmptyStyle}">
                            <localControls:HeaderedContentControl
                                Style="{StaticResource MultilineHyperlinkStyle}"
                                Header="custommessagebox"
                                Content="A modular dialog box to display notifications"/>
                        </HyperlinkButton>
                        <HyperlinkButton NavigateUri="/Samples/DateTimeConvertersSample.xaml"
                                         Style="{StaticResource HyperlinkEmptyStyle}">
                            <localControls:HeaderedContentControl
                                Style="{StaticResource MultilineHyperlinkStyle}"
                                Header="date+time converters"
                                Content="Localized time display for data binding"/>
                        </HyperlinkButton>
                        <HyperlinkButton NavigateUri="/Samples/DateTimePickerSample.xaml"
                                         Style="{StaticResource HyperlinkEmptyStyle}">
                            <localControls:HeaderedContentControl
                                Style="{StaticResource MultilineHyperlinkStyle}"
                                Header="date &amp; time pickers"
                                Content="Controls to select dates or times"/>
                        </HyperlinkButton>
                        <HyperlinkButton NavigateUri="/Samples/ExpanderViewSample.xaml"
                                         Style="{StaticResource HyperlinkEmptyStyle}">
                            <localControls:HeaderedContentControl
                                Style="{StaticResource MultilineHyperlinkStyle}"
                                Header="expanderview"
                                Content="Shows sub-items similar to the new email app"/>
                        </HyperlinkButton>
                        <HyperlinkButton NavigateUri="/Samples/FeatheredTransitionsSample1.xaml"
                                         Style="{StaticResource HyperlinkEmptyStyle}">
                            <localControls:HeaderedContentControl
                                Style="{StaticResource MultilineHyperlinkStyle}"
                                Header="featheredtransitions"
                                Content="Animate multiple elements between pages"/>
                        </HyperlinkButton>
                        <HyperlinkButton NavigateUri="/Samples/GestureSample.xaml"
                                         Style="{StaticResource HyperlinkEmptyStyle}">
                            <localControls:HeaderedContentControl
                                Style="{StaticResource MultilineHyperlinkStyle}"
                                Header="gestures"
                                Content="A gesture service for tap pinch, etc."/>
                        </HyperlinkButton>
                        <HyperlinkButton NavigateUri="/Samples/HubTileSample.xaml"
                                         Style="{StaticResource HyperlinkEmptyStyle}">
                            <localControls:HeaderedContentControl
                                Style="{StaticResource MultilineHyperlinkStyle}"
                                Header="hubtile"
                                Content="Tile control that is animated and alive"/>
                        </HyperlinkButton>
                        <HyperlinkButton NavigateUri="/Samples/ListPickerSample.xaml"
                                         Style="{StaticResource HyperlinkEmptyStyle}">
                            <localControls:HeaderedContentControl
                                Style="{StaticResource MultilineHyperlinkStyle}"
                                Header="listpicker"
                                Content="Select from a few items inline or many"/>
                        </HyperlinkButton>
                        <HyperlinkButton NavigateUri="/Samples/LockablePivotSample.xaml"
                                         Style="{StaticResource HyperlinkEmptyStyle}">
                            <localControls:HeaderedContentControl
                                Style="{StaticResource MultilineHyperlinkStyle}"
                                Header="lockablepivot"
                                Content="A Pivot that allows disabling navigation"/>
                        </HyperlinkButton>
                        <HyperlinkButton NavigateUri="/Samples/LongListSelectorSample.xaml"
                                         Style="{StaticResource HyperlinkEmptyStyle}">
                            <localControls:HeaderedContentControl
                                Style="{StaticResource MultilineHyperlinkStyle}"
                                Header="longlistselector"
                                Content="A grouping items control with great performance"/>
                        </HyperlinkButton>
                        <HyperlinkButton NavigateUri="/Samples/MultiselectListSample.xaml"
                                         Style="{StaticResource HyperlinkEmptyStyle}">
                            <localControls:HeaderedContentControl
                                Style="{StaticResource MultilineHyperlinkStyle}"
                                Header="multiselectlist"
                                Content="Support multiple selection in a list"/>
                        </HyperlinkButton>
                        <HyperlinkButton NavigateUri="/Samples/PerformanceProgressBarSample.xaml"
                                         Style="{StaticResource HyperlinkEmptyStyle}">
                            <localControls:HeaderedContentControl
                                Style="{StaticResource MultilineHyperlinkStyle}"
                                Header="performanceprogressbar"
                                Content="Show indeterminate progress in style"/>
                        </HyperlinkButton>
                        <HyperlinkButton NavigateUri="/Samples/PhoneTextBoxSample.xaml"
                                         Style="{StaticResource HyperlinkEmptyStyle}">
                            <localControls:HeaderedContentControl
                                Style="{StaticResource MultilineHyperlinkStyle}"
                                Header="phonetextbox"
                                Content="Add new features to the TextBox"/>
                        </HyperlinkButton>
                        <HyperlinkButton NavigateUri="/Samples/RatingControlSample.xaml"
                                         Style="{StaticResource HyperlinkEmptyStyle}">
                            <localControls:HeaderedContentControl
                                Style="{StaticResource MultilineHyperlinkStyle}"
                                Header="ratingcontrol"
                                Content="Simple control for star-based rating"/>
                        </HyperlinkButton>
                        <HyperlinkButton NavigateUri="/Samples/SlideInEffectSample.xaml"
                                         Style="{StaticResource HyperlinkEmptyStyle}">
                            <localControls:HeaderedContentControl
                                Style="{StaticResource MultilineHyperlinkStyle}"
                                Header="slideineffect"
                                Content="Make elements responsive to PivotItem sliding"/>
                        </HyperlinkButton>
                        <HyperlinkButton NavigateUri="/Samples/ToggleSwitchSample.xaml"
                                         Style="{StaticResource HyperlinkEmptyStyle}">
                            <localControls:HeaderedContentControl
                                Style="{StaticResource MultilineHyperlinkStyle}"
                                Header="toggleswitch"
                                Content="Offer a touch control for on/off choices"/>
                        </HyperlinkButton>
                        <HyperlinkButton NavigateUri="/Samples/TiltEffectSample.xaml"
                                         Style="{StaticResource HyperlinkEmptyStyle}">
                            <localControls:HeaderedContentControl
                                Style="{StaticResource MultilineHyperlinkStyle}"
                                Header="tilteffect"
                                Content="Make buttons visually responsive to touch"/>
                        </HyperlinkButton>
                        <HyperlinkButton NavigateUri="/Samples/TransferControlSample.xaml"
                                         Style="{StaticResource HyperlinkEmptyStyle}">
                            <localControls:HeaderedContentControl
                                Style="{StaticResource MultilineHyperlinkStyle}"
                                Header="transfercontrol"
                                Content="controls to show background downloads and uploads"/>
                        </HyperlinkButton>
                        <HyperlinkButton NavigateUri="/Samples/TransitionsSample.xaml"
                                         Style="{StaticResource HyperlinkEmptyStyle}">
                            <localControls:HeaderedContentControl
                                Style="{StaticResource MultilineHyperlinkStyle}"
                                Header="transitions"
                                Content="Beautifully animate between pages"/>
                        </HyperlinkButton>
                        <HyperlinkButton NavigateUri="/Samples/WrapPanelSample.xaml"
                                         Style="{StaticResource HyperlinkEmptyStyle}">
                            <localControls:HeaderedContentControl
                                Style="{StaticResource MultilineHyperlinkStyle}"
                                Header="wrappanel"
                                Content="A non-virtualized wrapping control"/>
                        </HyperlinkButton>
                    </StackPanel>
                    <Rectangle Height="40"/>
                </StackPanel>
            </ScrollViewer>
        </Grid>
    </Grid>

    <phone:PhoneApplicationPage.ApplicationBar>
        <shell:ApplicationBar IsVisible="True">
            <shell:ApplicationBarIconButton 
                IconUri="/Images/ApplicationBar.settings.png" Text="Settings"
                         IsEnabled="True" Click="ApplicationBarIconSettingsButton_Click"/>
        </shell:ApplicationBar>
    </phone:PhoneApplicationPage.ApplicationBar>
</phone:PhoneApplicationPage>
